/*
 * XML Type:  ComponentRole
 * Namespace: http:///org/isistan/flabot/coremodel.ecore
 * Java type: org.isistan.flabot.coremodelEcore.ComponentRole
 *
 * Automatically generated - do not modify.
 */
package org.isistan.flabot.coremodelEcore.impl;
/**
 * An XML ComponentRole(@http:///org/isistan/flabot/coremodel.ecore).
 *
 * This is a complex type.
 */
public class ComponentRoleImpl extends org.isistan.flabot.coremodelEcore.impl.ExtensibleElementImpl implements org.isistan.flabot.coremodelEcore.ComponentRole
{
    private static final long serialVersionUID = 1L;
    
    public ComponentRoleImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName NOTES$0 = 
        new javax.xml.namespace.QName("", "notes");
    private static final javax.xml.namespace.QName COMPONENT$2 = 
        new javax.xml.namespace.QName("", "component");
    private static final javax.xml.namespace.QName MAP$4 = 
        new javax.xml.namespace.QName("", "map");
    private static final javax.xml.namespace.QName NAME$6 = 
        new javax.xml.namespace.QName("", "name");
    private static final javax.xml.namespace.QName NOTES2$8 = 
        new javax.xml.namespace.QName("", "notes");
    private static final javax.xml.namespace.QName ABSTRACTINFO$10 = 
        new javax.xml.namespace.QName("", "abstractInfo");
    private static final javax.xml.namespace.QName COMPONENT2$12 = 
        new javax.xml.namespace.QName("", "component");
    private static final javax.xml.namespace.QName MAP2$14 = 
        new javax.xml.namespace.QName("", "map");
    
    
    /**
     * Gets array of all "notes" elements
     */
    public org.isistan.flabot.coremodelEcore.Note[] getNotesArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(NOTES2$8, targetList);
            org.isistan.flabot.coremodelEcore.Note[] result = new org.isistan.flabot.coremodelEcore.Note[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "notes" element
     */
    public org.isistan.flabot.coremodelEcore.Note getNotesArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.Note target = null;
            target = (org.isistan.flabot.coremodelEcore.Note)get_store().find_element_user(NOTES2$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "notes" element
     */
    public int sizeOfNotesArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(NOTES2$8);
        }
    }
    
    /**
     * Sets array of all "notes" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setNotesArray(org.isistan.flabot.coremodelEcore.Note[] notesArray)
    {
        check_orphaned();
        arraySetterHelper(notesArray, NOTES2$8);
    }
    
    /**
     * Sets ith "notes" element
     */
    public void setNotesArray(int i, org.isistan.flabot.coremodelEcore.Note notes)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.Note target = null;
            target = (org.isistan.flabot.coremodelEcore.Note)get_store().find_element_user(NOTES2$8, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(notes);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "notes" element
     */
    public org.isistan.flabot.coremodelEcore.Note insertNewNotes(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.Note target = null;
            target = (org.isistan.flabot.coremodelEcore.Note)get_store().insert_element_user(NOTES2$8, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "notes" element
     */
    public org.isistan.flabot.coremodelEcore.Note addNewNotes()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.Note target = null;
            target = (org.isistan.flabot.coremodelEcore.Note)get_store().add_element_user(NOTES2$8);
            return target;
        }
    }
    
    /**
     * Removes the ith "notes" element
     */
    public void removeNotes(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(NOTES2$8, i);
        }
    }
    
    /**
     * Gets array of all "component" elements
     */
    public org.isistan.flabot.coremodelEcore.ComponentModel[] getComponentArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(COMPONENT2$12, targetList);
            org.isistan.flabot.coremodelEcore.ComponentModel[] result = new org.isistan.flabot.coremodelEcore.ComponentModel[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "component" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentModel getComponentArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentModel target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentModel)get_store().find_element_user(COMPONENT2$12, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "component" element
     */
    public int sizeOfComponentArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(COMPONENT2$12);
        }
    }
    
    /**
     * Sets array of all "component" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setComponentArray(org.isistan.flabot.coremodelEcore.ComponentModel[] componentArray)
    {
        check_orphaned();
        arraySetterHelper(componentArray, COMPONENT2$12);
    }
    
    /**
     * Sets ith "component" element
     */
    public void setComponentArray(int i, org.isistan.flabot.coremodelEcore.ComponentModel component)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentModel target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentModel)get_store().find_element_user(COMPONENT2$12, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(component);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "component" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentModel insertNewComponent(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentModel target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentModel)get_store().insert_element_user(COMPONENT2$12, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "component" element
     */
    public org.isistan.flabot.coremodelEcore.ComponentModel addNewComponent()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.ComponentModel target = null;
            target = (org.isistan.flabot.coremodelEcore.ComponentModel)get_store().add_element_user(COMPONENT2$12);
            return target;
        }
    }
    
    /**
     * Removes the ith "component" element
     */
    public void removeComponent(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(COMPONENT2$12, i);
        }
    }
    
    /**
     * Gets array of all "map" elements
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap[] getMapArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(MAP2$14, targetList);
            org.isistan.flabot.coremodelEcore.UseCaseMap[] result = new org.isistan.flabot.coremodelEcore.UseCaseMap[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }
    
    /**
     * Gets ith "map" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap getMapArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().find_element_user(MAP2$14, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }
    
    /**
     * Returns number of "map" element
     */
    public int sizeOfMapArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(MAP2$14);
        }
    }
    
    /**
     * Sets array of all "map" element  WARNING: This method is not atomicaly synchronized.
     */
    public void setMapArray(org.isistan.flabot.coremodelEcore.UseCaseMap[] mapArray)
    {
        check_orphaned();
        arraySetterHelper(mapArray, MAP2$14);
    }
    
    /**
     * Sets ith "map" element
     */
    public void setMapArray(int i, org.isistan.flabot.coremodelEcore.UseCaseMap map)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().find_element_user(MAP2$14, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(map);
        }
    }
    
    /**
     * Inserts and returns a new empty value (as xml) as the ith "map" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap insertNewMap(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().insert_element_user(MAP2$14, i);
            return target;
        }
    }
    
    /**
     * Appends and returns a new empty value (as xml) as the last "map" element
     */
    public org.isistan.flabot.coremodelEcore.UseCaseMap addNewMap()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.isistan.flabot.coremodelEcore.UseCaseMap target = null;
            target = (org.isistan.flabot.coremodelEcore.UseCaseMap)get_store().add_element_user(MAP2$14);
            return target;
        }
    }
    
    /**
     * Removes the ith "map" element
     */
    public void removeMap(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(MAP2$14, i);
        }
    }
    
    /**
     * Gets the "name" attribute
     */
    public java.lang.String getName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$6);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "name" attribute
     */
    public org.apache.xmlbeans.XmlString xgetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$6);
            return target;
        }
    }
    
    /**
     * True if has "name" attribute
     */
    public boolean isSetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(NAME$6) != null;
        }
    }
    
    /**
     * Sets the "name" attribute
     */
    public void setName(java.lang.String name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$6);
            }
            target.setStringValue(name);
        }
    }
    
    /**
     * Sets (as xml) the "name" attribute
     */
    public void xsetName(org.apache.xmlbeans.XmlString name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$6);
            }
            target.set(name);
        }
    }
    
    /**
     * Unsets the "name" attribute
     */
    public void unsetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(NAME$6);
        }
    }
    
    /**
     * Gets the "notes" attribute
     */
    public java.lang.String getNotes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NOTES2$8);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "notes" attribute
     */
    public org.apache.xmlbeans.XmlString xgetNotes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NOTES2$8);
            return target;
        }
    }
    
    /**
     * True if has "notes" attribute
     */
    public boolean isSetNotes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(NOTES2$8) != null;
        }
    }
    
    /**
     * Sets the "notes" attribute
     */
    public void setNotes2(java.lang.String notes2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NOTES2$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NOTES2$8);
            }
            target.setStringValue(notes2);
        }
    }
    
    /**
     * Sets (as xml) the "notes" attribute
     */
    public void xsetNotes2(org.apache.xmlbeans.XmlString notes2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NOTES2$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NOTES2$8);
            }
            target.set(notes2);
        }
    }
    
    /**
     * Unsets the "notes" attribute
     */
    public void unsetNotes2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(NOTES2$8);
        }
    }
    
    /**
     * Gets the "abstractInfo" attribute
     */
    public java.lang.String getAbstractInfo()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ABSTRACTINFO$10);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "abstractInfo" attribute
     */
    public org.apache.xmlbeans.XmlString xgetAbstractInfo()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ABSTRACTINFO$10);
            return target;
        }
    }
    
    /**
     * True if has "abstractInfo" attribute
     */
    public boolean isSetAbstractInfo()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(ABSTRACTINFO$10) != null;
        }
    }
    
    /**
     * Sets the "abstractInfo" attribute
     */
    public void setAbstractInfo(java.lang.String abstractInfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(ABSTRACTINFO$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(ABSTRACTINFO$10);
            }
            target.setStringValue(abstractInfo);
        }
    }
    
    /**
     * Sets (as xml) the "abstractInfo" attribute
     */
    public void xsetAbstractInfo(org.apache.xmlbeans.XmlString abstractInfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(ABSTRACTINFO$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(ABSTRACTINFO$10);
            }
            target.set(abstractInfo);
        }
    }
    
    /**
     * Unsets the "abstractInfo" attribute
     */
    public void unsetAbstractInfo()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(ABSTRACTINFO$10);
        }
    }
    
    /**
     * Gets the "component" attribute
     */
    public java.lang.String getComponent2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COMPONENT2$12);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "component" attribute
     */
    public org.apache.xmlbeans.XmlString xgetComponent2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(COMPONENT2$12);
            return target;
        }
    }
    
    /**
     * True if has "component" attribute
     */
    public boolean isSetComponent2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(COMPONENT2$12) != null;
        }
    }
    
    /**
     * Sets the "component" attribute
     */
    public void setComponent2(java.lang.String component2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(COMPONENT2$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(COMPONENT2$12);
            }
            target.setStringValue(component2);
        }
    }
    
    /**
     * Sets (as xml) the "component" attribute
     */
    public void xsetComponent2(org.apache.xmlbeans.XmlString component2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(COMPONENT2$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(COMPONENT2$12);
            }
            target.set(component2);
        }
    }
    
    /**
     * Unsets the "component" attribute
     */
    public void unsetComponent2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(COMPONENT2$12);
        }
    }
    
    /**
     * Gets the "map" attribute
     */
    public java.lang.String getMap2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MAP2$14);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "map" attribute
     */
    public org.apache.xmlbeans.XmlString xgetMap2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(MAP2$14);
            return target;
        }
    }
    
    /**
     * True if has "map" attribute
     */
    public boolean isSetMap2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(MAP2$14) != null;
        }
    }
    
    /**
     * Sets the "map" attribute
     */
    public void setMap2(java.lang.String map2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MAP2$14);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(MAP2$14);
            }
            target.setStringValue(map2);
        }
    }
    
    /**
     * Sets (as xml) the "map" attribute
     */
    public void xsetMap2(org.apache.xmlbeans.XmlString map2)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(MAP2$14);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(MAP2$14);
            }
            target.set(map2);
        }
    }
    
    /**
     * Unsets the "map" attribute
     */
    public void unsetMap2()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(MAP2$14);
        }
    }
}
